// import com.alibaba.druid.sql.ast.SQLName;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "MySqlIndexHintImpl.h"
#include "../../../ast/SQLName.h"
#include "../visitor/MySqlASTVisitor.h"

MySqlIndexHintImpl::MySqlIndexHintImpl()
{
  indexList = std::make_shared<std::list<SQLName_ptr>>();
}
// @Override
void MySqlIndexHintImpl::accept0(MySqlASTVisitor_ptr visitor) {}

MySqlIndexHint_Option_ptr MySqlIndexHintImpl::getOption()
{
  return option;
}

void MySqlIndexHintImpl::setOption(MySqlIndexHint_Option_ptr option)
{
  this->option = option;
}

SQLName_list_ptr MySqlIndexHintImpl::getIndexList()
{
  return indexList;
}

void MySqlIndexHintImpl::setIndexList(SQLName_list_ptr indexList)
{
  this->indexList = indexList;
}

SQLObject_ptr MySqlIndexHintImpl::clone() {}

void MySqlIndexHintImpl::cloneTo(MySqlIndexHintImpl_ptr x)
{
  x->option = option;
  for (SQLName_ptr name : *indexList)
  {
    SQLName_ptr name2 = std::dynamic_pointer_cast<SQLName>(name->clone());
    name2->setParent(x);
    x->indexList->push_back(name2);
  }
}
